﻿using System.Configuration;

namespace AT.IBMS.Framework.Configuration
{
    public class LogElement : ConfigurationElement
    {

        /// <summary>
        /// 默认日志提供程序的名称。
        /// </summary>
        [ConfigurationProperty("providerName", IsRequired = true)]
        public string ProviderName
        {
            get
            {
                return (string)this["providerName"];
            }
        }

        [StringValidator(MinLength = 1)]
        [ConfigurationProperty("defaultCategory", IsRequired = true, DefaultValue = "General")]
        public string DefaultCategory
        {
            get
            {
                return (string)this["defaultCategory"];
            }
        }

        /// <summary>
        /// 日志提供程序的集合。
        /// </summary>
        [ConfigurationProperty("providers", IsRequired = true)]
        public ProviderSettingsCollection Providers
        {
            get
            {
                return (ProviderSettingsCollection)this["providers"];
            }
        }

    }
}
